package com.qfedu.openplateform.manager.service.impl;

import com.qfedu.openplateform.manager.dao.ApiSystemparamMapper;
import com.qfedu.openplateform.manager.entity.ApiSystemparam;
import com.qfedu.openplateform.manager.service.ApiSystemparamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ApiSystemparamServiceImpl implements ApiSystemparamService {
    @Autowired
    private ApiSystemparamMapper apiSystemparamMapper;

    @Override
    public List<ApiSystemparam> findAllAS(ApiSystemparam apiSystemparam) {
        List<ApiSystemparam> systemparams = apiSystemparamMapper.findAllAS(apiSystemparam);
        return systemparams;
    }

    @Override
    public int addAS(ApiSystemparam apiSystemparam) {
        int i = apiSystemparamMapper.addAS(apiSystemparam);
        return i;
    }

    @Override
    public int delASById(List<Integer> ids) {
        if (ids != null) {
            for (Integer id : ids) {
                apiSystemparamMapper.delASById(id);
            }
            return 1;
        }
        return 0;
    }

    @Override
    public int updateAS(ApiSystemparam apiSystemparam) {
        int i = apiSystemparamMapper.updateAS(apiSystemparam);
        return i;
    }
}
